public class MyArray <E>{
    Object[] arr = new Object[10];
    void setVal(int pos,E val){
        arr[pos]=val;
    }
    E getVal(int pos){
        return (E)arr[pos];
    }
}
